package com.huike.business.mapper;

import java.util.List;

import com.huike.business.domain.TbBusinessTrackRecord;
import com.huike.business.domain.vo.BusinessTrackVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

/**
 * 商机跟进记录Mapper接口
 *
 * @date 2021-04-28
 */
public interface TbBusinessTrackRecordMapper {

    /**
     * 添加商机跟进
     *
     * @param vo
     */
    void addBusiness(@Param("vo") BusinessTrackVo vo, @Param("createBy") String createBy, @Param("falseReason") String falseReason);

    /**
     * 根据商机id进行查询
     *
     * @param id
     * @return
     */
    @Select("select * from huike.tb_business_track_record where business_id= #{businessId}")
    List<TbBusinessTrackRecord> select(@Param("businessId") Long id);
     @Select("select * from tb_business_track_record where business_id=#{id}")
    List<TbBusinessTrackRecord> selectA(Long id);

    /**
     * 添加商机跟进记录
     * @param id
     * @param reason1
     */
    @Insert("insert into tb_business_track_record (business_id,record) values (#{id},#{reason1}) ")
    void inter(@Param("id") Long id, @Param("reason1") String reason1);
}